xyster.net » galleroo » readme

Galleroo

advanced tinkering

If advanced tinkering sounds too complicated, you might like to try the intermediate tinkering page

How Galleroo works

Galleroo creates galleries in four steps:

  1. user selection of style options and tweak mode
  2. generation of images, resource copying and XML metadata generation (galleroo.xml)
  3. XSL processing of the XML metadata to create an intermediate HTML file (galleroo.html)
  4. cutting and copying of the intermediate HTML file into the final gallery HTML files

You can create new XSL stylesheets to be used in the third step and thus create custom galleries. The more adventurous can also create a non-HTML intermediate file, an XSL-FO file, for example, and use it to create non-HTML galleries, such as PDF files (this confgurability may one day be integrated into Galleroo).

Start

XSL stylesheets are placed in the styles folder under the Galleroo installation folder. For instance, if you installed Galleroo in C:\Program Files\Galleroo, the styles folder is C:\Program Files\Galleroo\styles. Each style is in a folder that contains one file, named 'gallery.xsl', and optionally a subfolder named 'resources'. To create a new style, create a new folder and place a 'gallery.xsl' file in it. Galleroo will find the new style automatically the next time it is restarted. The easiest way to start creating your own custom styles is to examine and use the existing styles installed with Galleroo as a starting point.

XML format

The easiest way to learn the XML output generated by Galleroo is to view the file it generates every time you click the Go button. The file is named galleroo.xml and is placed in the Galleroo installation folder.

Galleroo builds the XML file as a series of nested objects. Each object has two parts, attrib and children. The attrib part contains named elements describing the object's attributes (such as name, width, height, etc.) while the children part contains more nested objects.

The tree generated by Galleroo consists of a base object, named lister, which has as attributes the options explicitly set by the user and image objects as children. Each image object is named after the original image it describes and has the image information as attributes (for example, size, resolution, file size, etc.)

You can also view the Galleroo DTD.

XSL parameters and options

Galleroo parses the style options available to the user directly from the XSL stylesheet parameters as defined in global <xsl:param> tags. Currently, Galleroo is not very smart and has the limitation that the <xsl:param> tags appear in one contiguous block at the top of the file so that Galleroo can properly parse them. In addition, default values for the parameters must be specified as a value in between the tags. Specifying a default using the select attribute of <xsl:param> is not supported.

Option behavior

Galleroo displays and allows editing options in different ways based on their names. The table below details what Galleroo will do.

option Galleroo's option editing behavior Passed to the stylesheet
ends with 'folder' folder selection dialog

unmodified

ends with 'image' file selection dialog only the file name
ends with 'file' file selection dialog only the file name
ends with 'color' color selection dialog unmodified
is 'sort-by' toggles between values (date/name) unmodified
starts with 'do' toggles between values (yes/no) unmodified
is 'nav-alignment' toggles between values (left/top/right/bottom) unmodified
is 'font' font selection dialog CSS stylesheet format

Resources

A style can include resources that are copied over to the gallery folder when the gallery is created. To add resources to a style, create a subfolder named 'resources' in the style folder and place the resources in it. Note that Galleroo does not support subfolders in the resource folder, all resources must be placed directly in the resource subfolder.

You can also allow a user to override the resources used by specifiying them as parameters in the XSL stylesheet. Galleroo, will copy the user specified resources to the gallery folder.

Preview

A style can detect that a preview is being generated by adding an XSL parameter named '_preview' in the stylesheet. The parameter must be defined in a seperate block after the normal style parameters so that Galleroo does not display the parameter to the user. The preview detection capability allows the stylesheet to change its output to better illustrate the style in the preview window.

Reporting bugs, questions and comments

If you find any bugs or have questions, comments or requests, you can contact the author through this email link

 


xyster.net

home | galleroo | lister | hebrish | junk | personal | aboo